#include "AddressBookService.h"

// 地址簿详情页
QList<Address> AddressBookService::getAddressBook(const QString &userID)
{
    return AddressBookDataAccess::getAddressBook(userID);
}

// 地址簿信息添加
bool AddressBookService::addUserAddress(int userId, const QString &label, const QString &name, const QString &phone, const QString &address)
{
    return AddressBookDataAccess::addAddress(userId, label, name, phone, address);
}

// 地址簿信息修改
bool AddressBookService::updateAddress(const int &addressId, const QString &label, const QString &name, const QString &phone, const QString &address)
{
    return AddressBookDataAccess::editAddress(addressId, label, name, phone, address);
}

// 地址簿信息删除
bool AddressBookService::removeAddress(int addressId)
{
    return AddressBookDataAccess::deleteAddress(addressId);
}
